﻿using System;

/// <summary>
/// 通用时间日期接口
/// </summary>
public interface IGameTime
{
    double GetNowDate ();
	string GetFormatNowDate();
    float GetNowTime();
    string GetFormatNowTime();
}

/// <summary>
/// 通用时间（现实时间）
/// </summary>
public class GeneralTime:IGameTime
{
	public double nowDate;
    public float nowTime;

    public double GetNowDate()
    {
        return nowDate;
    }

    public string GetFormatNowDate()
    {
        DateTime dtDateTime = new DateTime(1970, 1, 1, 0, 0, 0, 0, DateTimeKind.Utc);
        dtDateTime = dtDateTime.AddSeconds(nowDate).ToLocalTime();
        return dtDateTime.ToString("yyyy-MM-dd hh:mm:ss");
    }

   public float GetNowTime()
    {
        return nowTime;
    }

    public string GetFormatNowTime()
    {
        DateTime dtDateTime = new DateTime(1970, 1, 1, 0, 0, 0, 0, DateTimeKind.Utc);
        dtDateTime = dtDateTime.AddSeconds(nowDate).ToLocalTime();
        return dtDateTime.ToString("hh:mm:ss");
    }
}

public class TimeModel{

}
